export function setData(val: any) {
    return new Promise((resolve, reject) => {
        this.setState({
            ...val
        }, () => {
            resolve()
        })
    })
}

export function readBlobAsDataURL(blob: Blob | File) {
    var a = new FileReader();
    return new Promise((resolve, reject) => {
        a.onload = function (e) {
            resolve(e);
        };
        a.readAsDataURL(blob);
    })


}